package com.atguigu.gmall.product.service.impl;

import com.atguigu.gmall.model.product.BaseTrademark;
import com.atguigu.gmall.product.mapper.BaseTradeMarkMapper;
import com.atguigu.gmall.product.service.BaseTradeMarkService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * @author mgx
 * @version 1.0
 * @description: TODO
 * @date 2022/10/21 0:22
 */
@Service
public class BaseTradeMarkServiceImpl extends ServiceImpl<BaseTradeMarkMapper, BaseTrademark> implements BaseTradeMarkService {
    @Override
    public IPage<BaseTrademark> getTradeMarkList(Long page, Long limit) {
        QueryWrapper<BaseTrademark> queryWrapper = new QueryWrapper<>();
        queryWrapper.orderByAsc("id");
        Page<BaseTrademark> trademarkPage = new Page<BaseTrademark>(page, limit);
        return baseMapper.selectPage(trademarkPage, queryWrapper);
    }
}
